﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Nizm0.QOT.Panels
{
    public enum ImagesType{Corect, Wrong, Warning }

    public partial class VerificationLog : ToolWindow
    {
        //public enum ImagesType {Corect, Wrong, Warning }


        public VerificationLog()
        {
            InitializeComponent();
            ImageList imagelist = new ImageList();
            imagelist.Images.Add("Corect", global::Nizm0.QOT.Properties.Resources.Corect);
            imagelist.Images.Add("Wrong", global::Nizm0.QOT.Properties.Resources.Wrong);
            imagelist.Images.Add("Warning", global::Nizm0.QOT.Properties.Resources.Warning);
            listView1.SmallImageList = imagelist;
        }

        public void AddItem(string log, ImagesType i)
        {
            this.Show();
            ListViewItem item = new ListViewItem(log, listView1.SmallImageList.Images.IndexOfKey(i.ToString()));
            //listView1.Items.Add(log, log, listView1.SmallImageList.Images.IndexOfKey(i.ToString()));
            ListViewItem.ListViewSubItem listSubItem1 = new ListViewItem.ListViewSubItem(item, log);
            item.SubItems.Add(listSubItem1);
            listView1.Items.Add(item);
        }
    }
}
